<?php

namespace App\Api;

use App\Http\Controllers\Controller;
use App\Models\Sidershow;
use Illuminate\Http\Request;

class SidershowController extends Controller
{

    public function index()
    {
        $sidershow = Sidershow::all();
        return $sidershow;
    }

    public function store(Request $request)
    {
        $sidershow = Sidershow::create($request->input());

        return $this->message('添加成功');
    }

    public function show(Sidershow $sidershow)
    {
        return $sidershow;
    }


    public function update(Request $request, Sidershow $sidershow)
    {
        $sidershow->update($request->input());
        return $this->message('修改成功');
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param \App\Models\Sidershow $sidershow
     * @return \Illuminate\Http\Response
     */
    public function destroy(Sidershow $sidershow)
    {
        $sidershow->delete();
        return $this->message('删除成功');
    }

    public function list()
    {

    }
}
